GTK: Fix builds against latest stable GLib with MSVC
authorChun-wei Fan <fanchunwei@src.gnome.org>
Fri, 16 Apr 2021 03:36:18 +0000 (11:36 +0800)
committerChun-wei Fan <fanchunwei@src.gnome.org>
Fri, 16 Apr 2021 03:39:24 +0000 (11:39 +0800)
GLib-2.68.x now considers warning C4098 ('void' function returning a value) as
an error, so avoid doing that.

gtk/gtkcssimagepaintable.c
gtk/gtknative.c
gtk/gtkshortcutaction.c

index d4056ab263bf9a1175777af013a6b86bab8deeba..d45955c5df9c956a4968ac5a585dbd677e65b9c4 100644 (file)
@@ -66,9 +66,9 @@ gtk_css_image_paintable_snapshot (GtkCssImage *image,
 {
   GtkCssImagePaintable *paintable = GTK_CSS_IMAGE_PAINTABLE (image);
 
-  return gdk_paintable_snapshot (get_paintable (paintable),
-                                 snapshot,
-                                 width, height);
+  gdk_paintable_snapshot (get_paintable (paintable),
+                          snapshot,
+                          width, height);
 }
 
 static GtkCssImage *
index 546b088a4349c93bbe0aaafe0e94ba25ea08d721..7856d4f486e85e871c31fd7268e15625c794c041 100644 (file)
@@ -102,7 +102,7 @@ gtk_native_layout (GtkNative *self,
                    int        width,
                    int        height)
 {
-  return GTK_NATIVE_GET_IFACE (self)->layout (self, width, height);
+  GTK_NATIVE_GET_IFACE (self)->layout (self, width, height);
 }
 
 static void
@@ -258,7 +258,7 @@ gtk_native_get_surface_transform (GtkNative *self,
   g_return_if_fail (x != NULL);
   g_return_if_fail (y != NULL);
 
-  return GTK_NATIVE_GET_IFACE (self)->get_surface_transform (self, x, y);
+  GTK_NATIVE_GET_IFACE (self)->get_surface_transform (self, x, y);
 }
 
 /**
index 7870b0465cffec6b6e46a463e37d08731f694634..62d213911de7c58b13dc1921965dd1cbc37cfd69 100644 (file)
@@ -132,7 +132,7 @@ gtk_shortcut_action_print (GtkShortcutAction *self,
   g_return_if_fail (GTK_IS_SHORTCUT_ACTION (self));
   g_return_if_fail (string != NULL);
 
-  return GTK_SHORTCUT_ACTION_GET_CLASS (self)->print (self, string);
+  GTK_SHORTCUT_ACTION_GET_CLASS (self)->print (self, string);
 }
 
 /**